FLAGS= -g -o 
CFLAGS= -g -c -fPIC -DUSER_MODE -I../include
CC=gcc
CCP=g++
STRUCTOBJ= routine_dispatch.o
LIBNAME=dispatch
DEPENDLIB= -lmessage -lmemdb -lbasefunc -lcrypto_func -lstruct -ljson -lalloc -lstring -lsys_func -lexmodule

../lib/lib$(LIBNAME).so: $(STRUCTOBJ)
	$(CC) -shared -o lib$(LIBNAME).so $(STRUCTOBJ)
	mv   lib$(LIBNAME).so ../lib
../lib/lib$(LIBNAME).a: $(STRUCTOBJ)
	ar -rc lib$(LIBNAME).a $(STRUCTOBJ)
	mv   lib$(LIBNAME).a ../lib
routine_dispatch.o: routine_dispatch.c  
	$(CC) $(CFLAGS) ex_module.c

clean:
	rm -f  *~ *.o *.a ../lib/lib$(LIBNAME).so
